#include "cgic.h"

int cgiMain() 
{

#if 1
	char user[20];//用户名
    char pwd[16];//密码
    char* ret = NULL;

    cgiHeaderContentType("Content-Type:text/html\n\n");

    ret = getenv("REQUEST_METHOD");
    if(ret == NULL)
    {
        printf("获取method失败!");
        return 0;
    }
    printf("<h2>http请求形式:%s</h2>",ret);

    cgiFormStringNoNewlines("user_name", user, sizeof(user));
    cgiFormStringNoNewlines("user_pwd",pwd, sizeof(pwd));
    fprintf(cgiOut, "<h3>%s的请求数据:%s : %s</h3>",ret,user,pwd);

#endif
	return 0;
}

